import { useLocation } from 'react-router-dom';

function WebView() {
    const location = useLocation();
    const queryParams = new URLSearchParams(location.search);
    const url = queryParams.get('url');
    return (
        <div style={{ width: '100%', minHeight: '100vh' }}>
            <iframe
                style={{ width: '100%', minHeight: '100vh', margin: 0, padding: 0, border: 'none' }}
                src={url || 'https://www.baidu.com'}
            ></iframe>
        </div>
    );
}

export default WebView;
